import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/report',
  component: Layout,
  redirect: '/report/order_record',
  name: 'report',
  meta: {
    title: '报表管理',
    i18n: 'route.breadcrumb.root',
    icon: 'report',
  },
  children: [
    {
      path: 'order_header',
      name: 'order_header',
      component: () => import('@/views/report/order_header.vue'),
      meta: {
        title: '订单汇总',
      },
    }, {
      path: 'order_detail',
      name: 'order_detail',
      component: () => import('@/views/report/order_detail.vue'),
      meta: {
        title: '订单明细',
      },
    },
  ],
}

export default routes
